Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs
authorJim Porter <jporterbugs@gmail.com>
Fri, 14 Jun 2024 04:26:53 +0000 (21:26 -0700)
committerJim Porter <jporterbugs@gmail.com>
Fri, 21 Jun 2024 02:01:20 +0000 (19:01 -0700)
commite22b072423a6764632328d4e0fecc06a6e7efe9b
treee1280eda53f6731f0c6af09580cbef6cd5d928f4
parent1a55e957ae57ec32ae960eabdb170b5b427392d4
Ensure navigating by paragraphs in Eshell stops at prompts and paragraphs

The previous implementation in 6ae2b74ed20 only stopped at prompts,
which isn't the right behavior (bug#61545).

* lisp/eshell/em-prompt.el (eshell-forward-paragraph)
(eshell-backward-paragraph): Reimplement to handle prompts and
paragraphs (the latter by calling the original 'forward-paragraph').

* test/lisp/eshell/em-prompt-tests.el
(em-prompt-test/next-previous-prompt/multiline): Rename.
(em-prompt-test/forward-backward-paragraph-1): New function.
(em-prompt-test/forward-backward-paragraph)
(em-prompt-test/forward-backward-paragraph/multiline): New tests.
lisp/eshell/em-prompt.el
test/lisp/eshell/em-prompt-tests.el